<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>部门列表页面</title>
    <link th:href="@{/css/bootstrap.css}" rel="stylesheet">
</head>
<body>
<h1>部门列表</h1>
<table class="table table-dark">
    <tr>
        <td>部门编号：</td>
        <td>部门名称：</td>
        <td>部门负责人:</td>
        <td>部门办公地址：</td>
        <td>查看详情</td>
    </tr>
    <tbody>
    <tr th:each="d:${departmentList}">
        <td th:text="${d.deptCode}"></td>
        <td th:text="${d.deptName}"></td>
        <td th:text="${d.manger}"></td>
        <td th:text="${d.address}"></td>
        <td>
            <a class="btn btn-primary" th:href="@{/departmentDetail(code=${d.deptCode})}">详细信息</a>
            <a class="btn btn-success" th:href="@{/departmentEdit(code=${d.deptCode})}">编辑</a>
            <a class="btn btn-danger" th:href="@{/departmentDelete(code=${d.deptCode})}">删除</a>
            <a class="btn btn-warning" th:href="@{/departmentMark(code=${d.deptCode})}">标记删除</a>
        </td>
    </tr>
    </tbody>
</table>
<a th:href="@{/createDept}">新增部门</a>
</body>
</html>